getValues(); } } // Action Handlers if(isset($_GET['request'])) { if($_GET['request'] == "delete" && $_GET['section'] == 'contacts') { if(!empty($_GET['contactgroup_id'])) { $c = new Criteria(); $c->add(NagiosServiceContactGroupMemberPeer::SERVICE, $_GET['id']); $c->add(NagiosServiceContactGroupMemberPeer::CONTACT_GROUP, $_GET['contactgroup_id']); $membership = NagiosServiceContactGroupMemberPeer::doSelectOne($c); if($membership) { $membership->delete(); $success = "Contact Group Deleted"; } } else if(!empty($_GET['contact_id'])) { $c = new Criteria(); $c->add(NagiosServiceContactMemberPeer::SERVICE, $_GET['id']); $c->add(NagiosServiceContactMemberPeer::CONTACT, $_GET['contact_id']); $membership = NagiosServiceContactMemberPeer::doSelectOne($c); if($membership) { $membership->delete(); $success = "Contact deleted."; } } } else if($_GET['request'] == "delete" && $_GET['section'] == 'inheritance') { $c = new Criteria(); $c->add(NagiosServiceTemplateInheritancePeer::SOURCE_SERVICE, $service->getId()); $c->addAscendingOrderByColumn(NagiosServiceTemplateInheritancePeer::ORDER); $inheritanceList = NagiosServiceTemplateInheritancePeer::doSelect($c); $found = false; for($counter = 0; $counter < count($inheritanceList); $counter++) { if($inheritanceList[$counter]->getNagiosServiceTemplateRelatedByTargetTemplate()->getId() == $_GET['template_id']) { // Omg, we found it! // Delete the inheritance $inheritanceList[$counter]->delete(); // Okay, regrab the list $newList = NagiosServiceTemplateInheritancePeer::doSelect($c); for($counter = 0; $counter < count($newList); $counter++) { // Reordering $newList[$counter]->setOrder($counter); $newList[$counter]->save(); } $success = "Removed template from inheritance list."; } } if(empty($error)) { $error = "Could not find that template specified."; } } else if($_GET['request'] == "movedown" && $_GET['section'] == "inheritance") { $c = new Criteria(); $c->add(NagiosServiceTemplateInheritancePeer::SOURCE_SERVICE, $service->getId()); $c->addAscendingOrderByColumn(NagiosServiceTemplateInheritancePeer::ORDER); $inheritanceList = NagiosServiceTemplateInheritancePeer::doSelect($c); $found = false; for($counter = 0; $counter < count($inheritanceList); $counter++) { if($inheritanceList[$counter]->getNagiosServiceTemplateRelatedByTargetTemplate()->getId() == $_GET['template_id']) { // Omg, we found it! if($counter == (count($inheritanceList) -1)) { // We're at the end of the array, we couldn't possibly move down more! $error = "Cannot move that template down any further."; break; } else { $tempTemplate = $inheritanceList[$counter + 1]; $inheritanceList[$counter]->setOrder($inheritanceList[$counter]->getOrder() + 1); $tempTemplate->setOrder($tempTemplate->getOrder() - 1); $inheritanceList[$counter]->save(); $tempTemplate->save(); $success = "Template moved down in inheritance chain."; $found = true; break; } } } if(empty($error)) { $error = "Could not find that template specified."; } } else if($_GET['request'] == "moveup" && $_GET['section'] == "inheritance") { $c = new Criteria(); $c->add(NagiosServiceTemplateInheritancePeer::SOURCE_SERVICE, $service->getId()); $c->addAscendingOrderByColumn(NagiosServiceTemplateInheritancePeer::ORDER); $inheritanceList = NagiosServiceTemplateInheritancePeer::doSelect($c); $found = false; for($counter = 0; $counter < count($inheritanceList); $counter++) { if($inheritanceList[$counter]->getNagiosServiceTemplateRelatedByTargetTemplate()->getId() == $_GET['template_id']) { // Omg, we found it! if($counter == 0) { // We're at the end of the array, we couldn't possibly move down more! $error = "Cannot move that template up any further."; break; } else { $tempTemplate = $inheritanceList[$counter - 1]; $inheritanceList[$counter]->setOrder($inheritanceList[$counter]->getOrder() - 1); $tempTemplate->setOrder($tempTemplate->getOrder() + 1); $inheritanceList[$counter]->save(); $tempTemplate->save(); $success = "Template moved up in inheritance chain."; $found = true; break; } } } if(empty($error)) { $error = "Could not find that template specified."; } } if($_GET['request'] == "delete" && $_GET['section'] == 'servicegroups') { // !!!!!!!!!!!!!! This is where we do dependency error checking $c = new Criteria(); $c->add(NagiosServiceGroupMemberPeer::SERVICE, $_GET['id']); $c->add(NagiosServiceGroupMemberPeer::SERVICE_GROUP, $_GET['servicegroup_id']); $membership = NagiosServiceGroupMemberPeer::doSelectOne($c); if($membership) { $membership->delete(); $success = "Service Group Deleted"; } } if($_GET['request'] == "delete" && $_GET['section'] == 'dependencies') { $dependency = NagiosDependencyPeer::retrieveByPK($_GET['dependency_id']); if($dependency) { $dependency->delete(); $success = "Dependency deleted."; } } if($_GET['request'] == "delete" && $_GET['section'] == 'escalations') { // !!!!!!!!!!!!!! This is where we do dependency error checking $lilac->delete_escalation($_GET['escalation_id']); $success = "Escalation Deleted"; } if($_GET['request'] == "delete" && $_GET['section'] == 'checkcommand') { $param = NagiosServiceCheckCommandParameterPeer::retrieveByPK($_GET['checkcommandparameter_id']); if($param) { $param->delete(); $success = "Check Command Parameter Deleted."; } } } if(isset($_POST['request'])) { $modifiedData = array(); if(isset($_POST['service_manage']) && count($_POST['service_manage'])) { foreach( $_POST['service_manage'] as $key=>$value) { if( is_array( $value)) { $modifiedData[$key] = $value; } else { $modifiedData[$key] = (string)$value; } } } if($_POST['request'] == 'service_template_modify_general') { if($modifiedData['service_description'] != $service->getDescription()) { // Now check to see if we belong to a host or template, and if that service already exists for that name. $c = new Criteria(); $c->add(NagiosServicePeer::DESCRIPTION, $modifiedData['service_description']); if($service->getHost()) { $c->add(NagiosServicePeer::HOST, $service->getHost()); } else if($service->getHostTemplate()) { $c->add(NagiosServicePeer::HOST_TEMPLATE, $service->getHostTemplate()); } $tempService = NagiosServicePeer::doSelectOne($c); if($tempService) { $error = "A service with that name already exists!"; } else { $service->setDescription($modifiedData['service_description']); $service->setDisplayName($modifiedData['display_name']); $service->save(); unset($_GET['edit']); $success = "Service modified."; } } else { // Field Error Checking if(count($modifiedData)) { foreach($modifiedData as $tempVariable) $tempVariable = trim($tempVariable); } if($modifiedData['service_description'] == '') { $addError = 1; $error = "Incorrect values for fields. Please verify."; } // All is well for error checking, modify the template. else { $service->setDescription($modifiedData['service_description']); $service->setDisplayName($modifiedData['display_name']); $service->save(); unset($_GET['edit']); $success = "Service modified."; } } } else if($_POST['request'] == "add_template_command") { $template = NagiosServiceTemplatePeer::retrieveByPK($_POST['servicemanage']['template_add']['template_id']); if(!$template) { $error = "That service template is not found."; } else { // We need to get the count of templates already inherited $templateList = $service->getNagiosServiceTemplateInheritances(); foreach($templateList as $tempTemplate) { if($tempTemplate->getId() == $_POST['hostmanage']['template_add']['template_id']) { $error = "That template already exists in the inheritance chain."; } } if(empty($error)) { $newInheritance = new NagiosServiceTemplateInheritance(); $newInheritance->setNagiosService($service); $newInheritance->setNagiosServiceTemplateRelatedByTargetTemplate($template); $newInheritance->setOrder(count($templateList)); try { $newInheritance->save(); $success = "Template added to inheritance chain."; } catch(Exception $e) { $error = $e->getMessage(); } } } } else if($_POST['request'] == 'service_template_modify_checks') { if((isset($modifiedData['max_check_attempts']) && !is_numeric($modifiedData['max_check_attempts'])) || (isset($modifiedData['max_check_attempts']) && !($modifiedData['max_check_attempts'] >= 1)) || (isset($modifiedData['normal_check_interval']) && !is_numeric($modifiedData['normal_check_interval'])) || (isset($modifiedData['normal_check_interval']) && !($modifiedData['normal_check_interval'] >= 1)) || (isset($modifiedData['retry_interval']) && !is_numeric($modifiedData['retry_interval'])) || (isset($modifiedData['retry_interval']) && !($modifiedData['retry_interval'] >= 1)) || (isset($modifiedData['retry_interval']) && !is_numeric($modifiedData['retry_interval'])) || (isset($modifiedData['first_notification_delay']) && !is_numeric($modifiedData['first_notification_delay'])) || (isset($modifiedData['freshness_threshold']) && !($modifiedData['freshness_threshold'] >= 0))) { $addError = 1; $error = "Incorrect values for fields. Please verify."; } else { // Let's modify our host template if(isset($modifiedData['initial_state'])) { $service->setInitialState($modifiedData['initial_state']); } else { $service->setInitialState(null); } if(isset($modifiedData['is_volatile'])) { $service->setIsVolatile($modifiedData['is_volatile']); } else { $service->setIsVolatile(null); } if(isset($modifiedData['is_volatile'])) { $service->setIsVolatile($modifiedData['is_volatile']); } else { $service->setIsVolatile(null); } if(isset($modifiedData['check_command']) && $modifiedData['check_command'] != 0) { $service->setCheckCommand(NagiosCommandPeer::retrieveByPK($modifiedData['check_command'])->getId()); } else { $service->setCheckCommand(null); } if(isset($modifiedData['max_check_attempts'])) { $service->setMaximumCheckAttempts($modifiedData['max_check_attempts']); } else { $service->setMaximumCheckAttempts(null); } if(isset($modifiedData['normal_check_interval'])) { $service->setNormalCheckInterval($modifiedData['normal_check_interval']); } else { $service->setNormalCheckInterval(null); } if(isset($modifiedData['retry_interval'])) { $service->setRetryInterval($modifiedData['retry_interval']); } else { $service->setRetryInterval(null); } if(isset($modifiedData['first_notification_delay'])) { $service->setFirstNotificationDelay($modifiedData['first_notification_delay']); } else { $service->setFirstNotificationDelay(null); } if(isset($modifiedData['active_checks_enabled'])) { $service->setActiveChecksEnabled($modifiedData['active_checks_enabled']); } else { $service->setActiveChecksEnabled(null); } if(isset($modifiedData['passive_checks_enabled'])) { $service->setPassiveChecksEnabled($modifiedData['passive_checks_enabled']); } else { $service->setPassiveChecksEnabled(null); } if(isset($modifiedData['normal_check_interval'])) { $service->setNormalCheckInterval($modifiedData['normal_check_interval']); } else { $service->setNormalCheckInterval(null); } if(isset($modifiedData['check_period']) && $modifiedData['check_period'] != 0) { $service->setCheckPeriod(NagiosTimeperiodPeer::retrieveByPK($modifiedData['check_period'])->getId()); } else { $service->setCheckPeriod(null); } if(isset($modifiedData['parallelize_check'])) { $service->setParallelizeCheck($modifiedData['parallelize_check']); } else { $service->setParallelizeCheck(null); } if(isset($modifiedData['obsess_over_service'])) { $service->setObsessOverService($modifiedData['obsess_over_service']); } else { $service->setObsessOverService(null); } if(isset($modifiedData['check_freshness'])) { $service->setCheckFreshness($modifiedData['check_freshness']); } else { $service->setCheckFreshness(null); } if(isset($modifiedData['freshness_threshold'])) { $service->setFreshnessThreshold($modifiedData['freshness_threshold']); } else { $service->setFreshnessThreshold(null); } if(isset($modifiedData['event_handler_enabled'])) { $service->setEventHandlerEnabled($modifiedData['event_handler_enabled']); } else { $service->setEventHandlerEnabled(null); } if(isset($modifiedData['event_handler']) && $modifiedData['event_handler'] != 0) { $service->setEventHandler(NagiosCommandPeer::retrieveByPK($modifiedData['event_handler'])->getId()); } else { $service->setEventHandler(null); } if(isset($modifiedData['failure_prediction_enabled'])) { $service->setFailurePredictionEnabled($modifiedData['failure_prediction_enabled']); } else { $service->setFailurePredictionEnabled(null); } $service->save(); unset($_GET['edit']); $success = "Service modified"; } } else if($_POST['request'] == 'service_template_modify_flapping') { // Field Error Checking if(count($modifiedData)) { foreach($modifiedData as $tempVariable) $tempVariable = trim($tempVariable); } if((isset($modifiedData['low_flap_threshold']) && $modifiedData['low_flap_threshold'] < 0) || (isset($modifiedData['high_flap_threshold']) && $modifiedData['high_flap_threshold'] < 0)) { $addError = 1; $error = "Incorrect values for fields. Please verify."; } // All is well for error checking, modify the command. else { // Modify flapping information if(isset($modifiedData['flap_detection_enabled'])) { $service->setFlapDetectionEnabled($modifiedData['flap_detection_enabled']); } else { $service->setFlapDetectionEnabled(null); } if(!isset($_POST['service_manage_checkboxes']) || !isset($_POST['service_manage_checkboxes']['flap_detection_options'])) { $service->setFlapDetectionOnOk(null); $service->setFlapDetectionOnUnknown(null); $service->setFlapDetectionOnWarning(null); $service->setFlapDetectionOnCritical(null); } else { if(isset($_POST['service_manage']['flap_detection_on_ok'])) { $service->setFlapDetectionOnOk(true); } else { $service->setFlapDetectionOnOk(false); } if(isset($_POST['service_manage']['flap_detection_on_unknown'])) { $service->setFlapDetectionOnUnknown(true); } else { $service->setFlapDetectionOnUnknown(false); } if(isset($_POST['service_manage']['flap_detection_on_warning'])) { $service->setFlapDetectionOnWarning(true); } else { $service->setFlapDetectionOnWarning(false); } if(isset($_POST['service_manage']['flap_detection_on_critical'])) { $service->setFlapDetectionOnCritical(true); } else { $service->setFlapDetectionOnCritical(false); } } if(isset($modifiedData['low_flap_threshold'])) { $service->setLowFlapThreshold($modifiedData['low_flap_threshold']); } else { $service->setLowFlapThreshold(null); } if(isset($modifiedData['high_flap_threshold'])) { $service->setHighFlapThreshold($modifiedData['high_flap_threshold']); } else { $service->setHighFlapThreshold(null); } $service->save(); unset($modifiedData); $success = "Service modified."; unset($_GET['edit']); } } else if($_POST['request'] == 'service_template_modify_logging') { // Field Error Checking // None required for this process // All is well for error checking, modify the host template. if(isset($modifiedData['process_perf_data'])) { $service->setProcessPerfData($modifiedData['process_perf_data']); } else { $service->setProcessPerfData(null); } if(isset($modifiedData['retain_status_information'])) { $service->setRetainStatusInformation($modifiedData['retain_status_information']); } else { $service->setRetainStatusInformation(null); } if(isset($modifiedData['retain_nonstatus_information'])) { $service->setRetainNonstatusInformation($modifiedData['retain_nonstatus_information']); } else { $service->setRetainNonstatusInformation(null); } $service->save(); unset($modifiedData); $success = "Service modified."; unset($_GET['edit']); } else if($_POST['request'] == 'service_template_modify_notifications') { // Field Error Checking if(count($modifiedData)) { foreach($modifiedData as $tempVariable) $tempVariable = trim($tempVariable); } if(isset($_POST['service_manage_enablers']['notification_interval']) && ($modifiedData['notification_interval'] == '' || $modifiedData['notification_interval'] < 0 || !is_numeric($modifiedData['notification_interval']))) { $error = "Incorrect values for fields. Please verify."; } // All is well for error checking, modify the command. else { if(!isset($_POST['service_manage_checkboxes']) || !isset($_POST['service_manage_checkboxes']['notification_options'])) { $service->setNotificationOnCritical(null); $service->setNotificationOnFlapping(null); $service->setNotificationOnRecovery(null); $service->setNotificationOnUnknown(null); $service->setNotificationOnWarning(null); $service->setNotificationOnScheduledDowntime(null); } else { if(isset($_POST['service_manage']['notification_on_critical'])) { $service->setNotificationOnCritical(true); } else { $service->setNotificationOnCritical(false); } if(isset($_POST['service_manage']['notification_on_flapping'])) { $service->setNotificationOnFlapping(true); } else { $service->setNotificationOnFlapping(false); } if(isset($_POST['service_manage']['notification_on_recovery'])) { $service->setNotificationOnRecovery(true); } else { $service->setNotificationOnRecovery(false); } if(isset($_POST['service_manage']['notification_on_unknown'])) { $service->setNotificationOnUnknown(true); } else { $service->setNotificationOnUnknown(false); } if(isset($_POST['service_manage']['notification_on_warning'])) { $service->setNotificationOnWarning(true); } else { $service->setNotificationOnWarning(false); } if(isset($_POST['service_manage']['notification_on_scheduled_downtime'])) { $service->setNotificationOnScheduledDowntime(true); } else { $service->setNotificationOnScheduledDowntime(false); } } if(!isset($_POST['service_manage_checkboxes']) || !isset($_POST['service_manage_checkboxes']['stalking_options'])) { $service->setStalkingOnOk(null); $service->setStalkingOnWarning(null); $service->setStalkingOnUnknown(null); $service->setStalkingOnCritical(null); } else { if(isset($_POST['service_manage']['stalking_on_ok'])) { $service->setStalkingOnOk(true); } else { $service->setStalkingOnOk(false); } if(isset($_POST['service_manage']['stalking_on_warning'])) { $service->setStalkingOnWarning(true); } else { $service->setStalkingOnWarning(false); } if(isset($_POST['service_manage']['stalking_on_unknown'])) { $service->setStalkingOnUnknown(true); } else { $service->setStalkingOnUnknown(false); } if(isset($_POST['service_manage']['stalking_on_critical'])) { $service->setStalkingOnCritical(true); } else { $service->setStalkingOnCritical(false); } } if(isset($modifiedData['notifications_enabled'])) { $service->setNotificationsEnabled($modifiedData['notifications_enabled']); } else { $service->setNotificationsEnabled(null); } if(isset($modifiedData['notification_interval'])) { $service->setNotificationInterval($modifiedData['notification_interval']); } else { $service->setNotificationInterval(null); } if(isset($modifiedData['notification_period'])) { $service->setNotificationPeriod(NagiosTimeperiodPeer::retrieveByPK($modifiedData['notification_period'])->getId()); } else { $service->setNotificationPeriod(null); } $service->save(); // Remove session data unset($modifiedData); $success = "Service modified."; unset($_GET['edit']); } } if($_POST['request'] == 'update_service_extended') { // We properly got an service. if(isset($modifiedData['notes'])) { $service->setNotes($modifiedData['notes']); } else { $service->setNotes(null); } if(isset($modifiedData['notes_url'])) { $service->setNotesUrl($modifiedData['notes_url']); } else { $service->setNotesUrl(null); } if(isset($modifiedData['action_url'])) { $service->setActionUrl($modifiedData['action_url']); } else { $service->setActionUrl(null); } if(isset($modifiedData['icon_image'])) { $service->setIconImage($modifiedData['icon_image']); } else { $service->setIconImage(null); } if(isset($modifiedData['icon_image_alt'])) { $service->setIconImageAlt($modifiedData['icon_image_alt']); } else { $service->setIconImageAlt(null); } $service->save(); $success = "Updated Service Extended Information"; } else if($_POST['request'] == 'add_contact_command') { $c = new Criteria(); $c->add(NagiosServiceContactMemberPeer::SERVICE, $_GET['id']); $c->add(NagiosServiceContactMemberPeer::CONTACT, $_POST['service_manage']['contact_add']['contact_id']); $membership = NagiosServiceContactMemberPeer::doSelectOne($c); if($membership) { $error = "That contact already exists in that list!"; } else { $tempContact = NagiosContactPeer::retrieveByPk($_POST['service_manage']['contact_add']['contact_id']); if($tempContact) { $membership = new NagiosServiceContactMember(); $membership->setService($_GET['id']); $membership->setNagiosContact($tempContact); $membership->save(); $success = "New Service Template Contact Link added."; } else { $error = "That contact is not found."; } } } else if($_POST['request'] == 'add_contactgroup_command') { $c = new Criteria(); $c->add(NagiosServiceContactGroupMemberPeer::SERVICE, $_GET['id']); $c->add(NagiosServiceContactGroupMemberPeer::CONTACT_GROUP, $_POST['contactgroup_id']); $membership = NagiosServiceContactGroupMemberPeer::doSelectOne($c); if($membership) { $error = "That contact group already exists in that list!"; } else { $tempGroup = NagiosContactGroupPeer::retrieveByPk($_POST['contactgroup_id']); if($tempGroup) { $membership = new NagiosServiceContactGroupMember(); $membership->setService($_GET['id']); $membership->setNagiosContactGroup($tempGroup); $membership->save(); $success = "New Service Contact Group Link added."; } } } else if($_POST['request'] == 'add_servicegroup_command') { $c = new Criteria(); $c->add(NagiosServiceGroupMemberPeer::SERVICE, $service->getId()); $c->add(NagiosServiceGroupMemberPeer::SERVICE_GROUP, $_POST['servicegroup_id']); $tempMembership = NagiosServiceGroupMemberPeer::doSelectOne($c); if($tempMembership) { $error = "That service group already exists in that list!"; } else { $membership = new NagiosServiceGroupMember(); $membership->setService($service->getId()); $membership->setServiceGroup($_POST['servicegroup_id']); $membership->save(); $success = "New Service Group Link added."; } } else if($_POST['request'] == 'command_parameter_add') { if(trim($_POST['service_manage']['parameter']) == "") { $error = "Parameter cannot be blank."; } else { // All is well for error checking, modify the command. $param = new NagiosServiceCheckCommandParameter(); $param->setService($service->getId()); $param->setParameter($_POST['service_manage']['parameter']); $param->save(); $success = "Command Parameter added."; } } } if(isset($_GET['id'])) { // Load template. $service = NagiosServicePeer::retrieveByPK($_GET['id']); if(!$service) { header("Location: welcome.php"); die(); } else { // GET VALUES $serviceValues = $service->getValues(); } } // To create a "default" command $command_list[] = array("command_id" => 0, "command_name" => "None"); $lilac->return_command_list($tempList); foreach($tempList as $command) { $command_list[] = array("command_id" => $command->getId(), "command_name" => $command->getName()); } $period_list = array(); $lilac->return_period_list($tempList); foreach($tempList as $period) { $period_list[] = array("timeperiod_id" => $period->getId(), "timeperiod_name" => $period->getName()); } $volatile_list[] = array("value" => 0, "label" => "Not Volatile"); $volatile_list[] = array("value" => 1, "label" => "Volatile"); $initialState_list = array(); $initialState_list[] = array('value' => 'o', 'label' => 'Ok'); $initialState_list[] = array('value' => 'w', 'label' => 'Warning'); $initialState_list[] = array('value' => 'c', 'label' => 'Critical'); $initialState_list[] = array('value' => 'u', 'label' => 'Unknown'); if($service->getNagiosHostTemplate()) { $subtitle = " for Host Template " . $service->getNagiosHostTemplate()->getName(); $sublinktitle = "Back To Host Template " . $service->getNagiosHostTemplate()->getName(); $sublink = "host_template.php?id=" . $service->getNagiosHostTemplate()->getId() . "§ion=services"; } else if($service->getNagiosHost()) { $subtitle = " for Host " . $service->getNagiosHost()->getName(); $sublinktitle = "Back To Host " . $service->getNagiosHost()->getName(); $sublink = "hosts.php?id=" . $service->getNagiosHost()->getId() . "§ion=services"; } else if($service->getNagiosHostgroup()) { $subtitle = " for Hostgroup " . $service->getNagiosHostgroup()->getName(); $sublinktitle = "Back To Hostgroup " . $service->getNagiosHostgroup()->getName(); $sublink = "hostgroups.php?id=" . $service->getNagiosHostgroup()->getId() . "§ion=services"; } // Build subnav $subnav = array( 'general' => 'General', 'inheritance' => 'Inheritance', 'checks' => 'Checks', 'flapping' => 'Flapping', 'logging' => 'Logging', 'notifications' => 'Notifications', 'servicegroups' => 'Group Membership', 'contacts' => 'Contacts', 'extended' => 'Extended Information', 'dependencies' => 'Dependencies', 'escalations' => 'Escalations' ); if(isset($tempServiceTemplateInfo['check_command']) || isset($serviceValues['check_command'])) { $subnav['checkcommand'] = "Check Command Parameters"; } print_header("Service Editor"); print_window_header("Service Info for " . $service->getDescription() . $subtitle, "100%"); print_subnav($subnav, $_GET['section'], "section", $_SERVER['PHP_SELF'] . "?id=" . $_GET['id']); $service_icon_image = $path_config['image_root'] . "services.gif"; if($_GET['section'] == 'general') { ?>
|
return_command_list($check_command_list); ?> |
"flap_detection_on_ok", 'label' => "Ok"); $flap_detection_options_checkbox_group[] = array('field' => "flap_detection_on_warning", 'label' => "Warning"); $flap_detection_options_checkbox_group[] = array('field' => "flap_detection_on_unknown", 'label' => "Unknown"); $flap_detection_options_checkbox_group[] = array('field' => "flap_detection_on_critical", 'label' => "Critical"); ?> |
"notification_on_warning", 'label' => "Warning"); $notification_options_checkbox_group[] = array('field' => "notification_on_unknown", 'label' => "Unknown"); $notification_options_checkbox_group[] = array('field' => "notification_on_critical", 'label' => "Critical"); $notification_options_checkbox_group[] = array('field' => "notification_on_recovery", 'label' => "Recovery"); $notification_options_checkbox_group[] = array('field' => "notification_on_flapping", 'label' => "Flapping"); $notification_options_checkbox_group[] = array('field' => "notification_on_scheduled_downtime", 'label' => "Scheduled Downtime"); $stalking_options_checkbox_group[] = array('field' => "stalking_on_ok", 'label' => "Ok"); $stalking_options_checkbox_group[] = array('field' => "stalking_on_warning", 'label' => "Warning"); $stalking_options_checkbox_group[] = array('field' => "stalking_on_unknown", 'label' => "Unknown"); $stalking_options_checkbox_group[] = array('field' => "stalking_on_critical", 'label' => "Critical"); ?> |
|
Included in definition: \n"; print_display_field("Notes", $serviceValues, "notes", $_GET['id']); print_display_field("Notes URL", $serviceValues, "notes_url", $_GET['id']); print_display_field("Action URL", $serviceValues, "action_url", $_GET['id']); print_display_field("Icon Image", $serviceValues, "icon_image", $_GET['id']); print_display_field("Icon Image Alt Text", $serviceValues, "icon_image_alt", $_GET['id']); ?> [ Edit ] |
|
|
|
[ Create A New Service Dependency For This Service ] |
[ Create A New Escalation For This Template ] |